package com.example.maruko_course_backend.constants;

import java.util.Arrays;
import java.util.List;

import static com.example.maruko_course_backend.utils.StringUtil.CAESURA;
import static com.example.maruko_course_backend.utils.StringUtil.DASH;

public class HiraganaConstants {
  public static final List<String> allHiraganaLists = Arrays.asList(
      "あ", "い", "う", "え", "お",
      "か", "き", "く", "け", "こ",
      "さ", "し", "す", "せ", "そ",
      "た", "ち", "つ", "て", "と",
      "な", "に", "ぬ", "ね", "の",
      "は", "ひ", "ふ", "へ", "ほ",
      "ま", "み", "む", "め", "も",
      "や", "ゆ", "よ",
      "ら", "り", "る", "れ", "ろ",
      "わ", "を"
  );

  public static final List<String> allHiraganaChangeLists = Arrays.asList(
      "が", "ぎ", "ぐ", "げ", "ご",
      "ざ", "じ", "ず", "ぜ", "ぞ",
      "だ", "ぢ", "づ", "で", "ど",
      "ば", "び", "ぶ", "べ", "ぼ",
      "ぱ", "ぴ", "ぷ", "ぺ", "ぽ",
      "っ", "ん"
  );

  public static final List<String> otherNoTranslateLists = Arrays.asList(
      CAESURA, DASH
  );

  public static boolean isHiragana(String input) {
    return allHiraganaLists.contains(input) || allHiraganaChangeLists.contains(input) || otherNoTranslateLists.contains(input);
  }

  public static boolean isKanji(String input) {
    return !isHiragana(input);
  }
}
